package com.iqiyi.pps.epg.core.model.program;

/**
 * Created by karkarrotxu on 2017/3/29.
 */
public class DirectorChangeAssist {
    private boolean change = false;

    private String originalSign;

    public DirectorChangeAssist(ProgramData programData) {
        originalSign = accountSign(programData);
    }

    public void checkAgain(ProgramData programData) {
        String newSign = accountSign(programData);
        change = !originalSign.equals(newSign);
    }

    public String accountSign(ProgramData programData) {
        String sign = programData.getPname() + "|" +
                programData.getStartPlayTime().getTime() + "|" +
                programData.getStopPlayTime().getTime() ;
        return sign;
    }

    public boolean isChange() {
        return change;
    }
}
